<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>绝对定位</title>

    <title>定位-绝对定位</title>
<style>
    /* 定位的关键字 position */
    /* 绝对定位 定位原点是和父元素有关的（父元素也要定位） 会脱离文档流 absolute */
    .f{
        width: 300px;
        height: 300px;
        background-color: cadetblue;
        position: absolute;
        left: 200px;
        top: 200px;
    }

    .s{
        width: 100px;
        height: 100px;
        background-color: royalblue;
        position: absolute;
        left: 0;
        top: 0;
        transition: all 2s linear 0s;
    }

    .f:hover .s{
        left: 150px; 
        top:150px;
    }
    .other{
        width: 200px;
        height:200px;
        border:3px solid orange;
        text-align: center;
    }
</style>
</head>
<body>
    <div class="f">
        <div class="s"></div>
    </div>
    <div class="other">参照物</div>
</body>
</html>